Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake error when build with capstone as submodule #2619

Open
wants to merge 1 commit into
base: v5
Choose a base branch
from

Conversation

WerWolv
Copy link

@WerWolv WerWolv commented Feb 2, 2025

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

Hey, really simple change making sure that cpack doesn't try to look for a LICENSE.TXT file in the main project root but in the current project root. This fixes the usecase where capstone is being included as a submodule and loaded using add_subdirectory in a cmake project. Previously it would look for LICENSE.TXT in the main project root directory, now it's looking for it in the capstone subdirectory.

Test plan

  • Create a sample cmake project, put capstone into a subfolder and include it in the main cmake script using add_subdirectory. Previously this would fail with a cpack error. Now it doesn't anymore.

Closing issues

  • None

@imphil
Copy link

imphil commented Feb 19, 2025

I just saw this PR, it's fixing the same problem as #2629.

@Rot127
Copy link
Collaborator

Rot127 commented Feb 20, 2025

Yes, but this is for the v5 branch.
Feel free to duplicate your PR for the v5 branch as well.

@WerWolv didn't seem to have time to fix the CI.

@imphil
Copy link

imphil commented Feb 20, 2025

Ah, I did overlook that this PR is targeting v5.

Feel free to duplicate your PR for the v5 branch as well.

I personally don't use v5, but I'm happy happy to backport the fix (if needed there) as soon as it is merged in to the next branch.

@Rot127
Copy link
Collaborator

Rot127 commented Feb 20, 2025

It would be pretty helpful. A lot of people use v5 still. Because they can't put the effort into changing to v6 currently (or don't get enough out of it).
So we would really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants